import {mapGetters} from 'vuex'

export default {
  data(){
    return{
      timeNow:''
    }
  },
  computed: {
    ...mapGetters([
      'sysTime'
    ])
  },
  watch:{
    sysTime(newV,oldV){
      if(this.$route.meta.page === 'message'){
        this.timeNow = newV
      }else{
        this.form.publishTime = newV
      }
    }
  },
  created: function () {
    let {id} = this.$route.query
    if(!id)this.$store.dispatch('getSysTime')
  }
}
